<!--
 * @Description: 
 * @Autor: Zhongyu
 * @Date: 2021-03-18 15:49:05
 * @LastEditors: Zhongyu
 * @LastEditTime: 2021-03-18 15:50:56
-->


<template>
	<div class="departments">
		<div class="departments-head">
			<z-search :form-data="formInline" :form-items="formItems"></z-search>
		</div>
		<div class="departments-body">
			<el-table :data="tableDatas">
				<el-table-column prop="nick_name" label="用户昵称" align="center"></el-table-column>
				<el-table-column prop="dep_name" label="所在部门" align="center"></el-table-column>
				<el-table-column prop="role_name" label="用户角色" align="center"></el-table-column>
				<el-table-column
					prop="last_login_time"
					label="最后登陆时间"
					align="center"
				></el-table-column>
			</el-table>
			<z-pagination :total="100"></z-pagination>
		</div>
	</div>
</template>

<script>
import ZSearch from '../../components/ZSearch';
import ZPagination from '../../components/ZPagination';
export default {
	components: {
		ZSearch,
		ZPagination
	},
	data() {
		return {
			breadcrumbDatas: [
				{
					title: '用户管理',
				},
			],
			formInline: {
				user: '',
				dep_name: '',
			},
			formItems: [
				{
					key: 'user',
					label: '用户昵称',
					placeholder: '请输入用户昵称',
				},
				{
					key: 'dep_name',
					label: '部门名称',
					placeholder: '请输入部门名称',
				},
			],
			tableDatas: [
				{
					nick_name: 'admin',
					dep_name: '-',
					role_name: '管理员',
					last_login_time: '2021-03-16 10:22:32',
				},
				{
					nick_name: '张三',
					dep_name: '策划部',
					role_name: '部门经理',
					last_login_time: '2021-03-16 09:52:20',
					login_number: 87,
				},
				{
					nick_name: '李四',
					dep_name: '策划部',
					role_name: '员工',
					last_login_time: '2021-03-06 21:22:32',
					login_number: 21,
				},
				{
					nick_name: '旺达',
					dep_name: '策划部',
					role_name: '员工',
					last_login_time: '2021-02-16 11:22:32',
					login_number: 33,
				},
				{
					nick_name: '胖达',
					dep_name: '设计部',
					role_name: '部门经理',
					last_login_time: '2021-02-10 11:22:32',
					login_number: 43,
				},
				{
					nick_name: 'admin',
					dep_name: '设计部',
					role_name: '员工',
					last_login_time: '2021-03-16 10:22:32',
				},
				{
					nick_name: '张三',
					dep_name: '设计部',
					role_name: '员工',
					last_login_time: '2021-03-16 09:52:20',
					login_number: 87,
				},
				{
					nick_name: '李四',
					dep_name: '技术部',
					role_name: '部门经理',
					last_login_time: '2021-03-06 21:22:32',
					login_number: 21,
				},
				{
					nick_name: '旺达',
					dep_name: '技术部',
					role_name: '员工',
					last_login_time: '2021-02-16 11:22:32',
					login_number: 33,
				},
				{
					nick_name: '胖达',
					dep_name: '技术部',
					role_name: '员工',
					last_login_time: '2021-02-10 11:22:32',
					login_number: 43,
				},
			],
		};
	},
	created() {
		this.$store.dispatch('breadcrumbDataActions', [
			{
				title: '部门管理',
			},
		]);
	},
	mounted() {},
	methods: {
		onSubmit() {
			console.log('submit!');
		},
	},
};
</script>

<style lang="less" src="./index.less"></style>
